module.exports = {
    runtimeCompiler: true,
    publicPath: '/', // 设置打包文件相对路径
    devServer: {
        // open: process.platform === 'darwin',
        //host: 'localhost',
        port: 8081,
        open: true, //配置自动启动浏览器
        proxy: {
            '/api': {
                target: process.env.VUE_APP_Axios_baseURL, //接口
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    /**pdf预览加入读取file配置**/
    chainWebpack: config => {
        config.module
            .rule('url-loader')
            .test(/\.(pdf)(\?.*)?$/)
            .use('url-loader')
            .loader('url-loader')
            .end()
    },
}